package com.ruoyi.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采购单管理对象 erp_purchase_order_management
 * 
 * @author ruoyi
 * @date 2025-07-17
 */
@Data
@TableName("erp_purchase_order_management")
public class ErpPurchaseOrderManagement extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 采购单ID，主键
     */
    private int id;

    /**
     * 采购单号
     */
    @Excel(name = "采购单号")
    private String purchaseOrderNo;

    /**
     * 关联供应商管理表ID
     *
     *
     */
    private int supplierId;

    @Excel(name = "审核状态", readConverterExp = "如=：待审核、已审核等")
    private int auditStatus;

    /** 创建人 */
    @Excel(name = "创建人")
    private String creator;
    @Excel(name = "到货日期")
    private Date daohuorq;
//    只用于连接表
@TableField(updateStrategy = FieldStrategy.NEVER)
    private int purchaseRequestId;
    @Excel(name = "单据状态", readConverterExp = "如=：待审核、已批准等")
    @TableField(
            select = false, // 不参与查询（SELECT 语句中不包含该字段）
            insertStrategy = FieldStrategy.NEVER // 不参与新增（INSERT 语句中不包含该字段）
    )    private int  docStatus;
    @Excel(name = "审批意见", readConverterExp = "如=：待审核、已批准等")
    @TableField(exist = false)
    private String opinion;
    @Excel(name = "选择（同意 拒绝）", readConverterExp = "如=：待审核、已批准等")
    @TableField(exist = false)
    private int choice;
    @TableField(exist = false)
    private  int xzid;
    /**
     * 采购日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "采购日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date purchaseDate;

    /**
     * 采购总金额
     */
    @Excel(name = "采购总金额")
    private int totalprice;

    /**
     * 采购单状态（如：待发货、已完成等）
     */
    @Excel(name = "采购单状态", readConverterExp = "如=：待发货、已完成等")
    private String status;
    @TableField(exist = false)
    private String sourceDoc;



}

